Numeric solutions of ordinary differential equations

What does it mean to solve a differential equation numerically? Recall that the solution of an ODE is a function, y(t). A function y(t) is fundamentally a set of points having the form (t,y(t)). When we talk about a numeric solution to an ODE, we mean a large list of (t,y) points where the y in each point is approximately equal to y(t).

To find these solutions, we start by looking at our general form of the ODE:

, initial condition , and is some combination of terms involving the independent variable t and the unknown function y(t).

Numeric solutions of ODE's start with what we know, the initial condition , and use this and the ODE itself to estimate the function at a nearby point. The ODE allows us to compute the derivative of the unknown function at the point because

we use this derivative as the slope to give a direction in which to estimate the next point of the numeric solution . This is done over and over until an approximation to the function is known over the total domain of interest. The result of this process is pairs of points and , k=0,1,2,.... The following figure gives a graphical explanation of the idea behind the numeric solution of ODE's.

Maple Screenshot

We know and and we know the slope of y(t), y' given as y'=F(t,y).
We don't know y(t) for any values of t other than .

We will describe how to obtain approximate solutions to ODE's using a class of methods called Runge-Kutta methods. (There are other numeric techniques for solving ODE's that we will not discuss.) We consider the equation from an initial time up to some later time . We choose a time step , often denoted in mathematics texts as h. The solution is computed at the discrete times for k=0,1,2.... The approximate solution at time will be denoted by . Note that a numeric solution to a differential equation is a table of numbers, each of which gives an approximation to the true solution at each time . This is to be distinguished from the exact analytical solution, which is a continuous function.

The first method we will discuss is called Euler's method, named after a famous mathematician named Euler (pronounced "Oiler"). Euler's method is obtained by approximating the derivative at time with a simple difference. The approximating equation is

Rearranging, this can be rewritten as

where:

is the standard form of the ODE
is the time step
is the initial time
are the discrete times at which the solution is computed for k=0, 1, 2, 3…
is the approximate solution at time